<?php

use Illuminate\Http\Request;


Route::group(['prefix'=>'user'], function() {
    Route::any('usersregist', 'Api\UserController@usersregist');          #注册用户
    Route::any('regist', 'Api\UserController@regist');                    #注册用户
    Route::post('ad', 'Api\UserController@ad');             #用户对于某个打卡的打卡记录
});

# 用户相关路由
Route::group(['prefix'=>'user', 'middleware'=>['api.token']], function() {
    Route::any('userinfo', 'Api\UserController@userinfo');          #注册用户
    Route::any('edituser', 'Api\UserController@edituser');          #修改用户信息
    Route::any('getlike', 'Api\UserController@getlike');            #添加喜好统计
    Route::post('upload', 'Api\TestController@upload');             #上传图片
    Route::post('saveformid', 'Api\UserController@saveformid');             #收集用户formid
    Route::post('setlike', 'Api\UserController@setLike');             #点赞
    Route::post('getuserinfo', 'Api\UserController@getUserInfo');             #用户主页
    Route::post('getpunchlist', 'Api\UserController@getPunchList');             #用户主页
    Route::post('mypunchlist', 'Api\UserController@myPunchList');             #用户对于某个打卡的打卡记录



    Route::post('addrelation', 'Api\UserController@addRelation');             #关注取消操作
    Route::post('getotherinfos', 'Api\UserController@getOtherInfos');             #查看用户信息
    Route::post('getotherpunch', 'Api\UserController@getOtherPunch');             #
    Route::post('getotherdynamic', 'Api\UserController@getOtherDynamic');             #
    Route::post('getotherdynamics', 'Api\UserController@getOtherDynamics');             #
    Route::post('getafuserlist', 'Api\UserController@getAFUserList');             #
});

# 打卡相关路由
Route::group(['prefix'=>'class', 'middleware'=>['api.token']], function() {
    Route::post('classlist', 'Api\ClassController@classList');            #课程列表
    Route::post('addclassnote', 'Api\ClassController@addClassNote');            #添加笔记
    Route::post('calssdetail', 'Api\ClassController@calssDetail');            #课程详情
    Route::post('getnotelist', 'Api\ClassController@getNoteList');            #笔记列表




    Route::post('addpunch', 'Api\PunchController@addPunch');      #发布打卡
    Route::post('punchdetail', 'Api\PunchController@punchDetail');      #打卡详情
    Route::post('addpunchrecord', 'Api\PunchController@addPunchRecord');      #添加打卡记录
    Route::post('makeqrcode', 'Api\PunchController@makeqrcode');      #添加打卡记录
    Route::post('getjoinum', 'Api\PunchController@getJoinNum');      #参加人数
    Route::post('delpunch', 'Api\PunchController@delPunch');      #参加人数
    Route::post('addcomments', 'Api\PunchController@addComments');             #添加评论
    Route::post('gettestuser', 'Api\PunchController@gettestuser');             #添加评论
});


# 订单相关接口
Route::group(['prefix'=>'goods', 'middleware'=>['api.token']], function() {
    Route::any('goodsdetail', 'Api\GoodsController@goodsDetail');          #商品详情接口
    Route::any('goodslist', 'Api\GoodsController@goodsList');          #商品列表接口
});

# 订单相关接口
Route::group(['prefix'=>'notify'], function() {
    Route::any('ordernotify', 'Api\OrderController@ordernotify');          #支付接口
});

# 测试类接口
Route::group(['prefix'=>'test'], function() {
    Route::any('sendtemp', 'Api\TestController@sendtemp');          #测试发送模板消息
    Route::any('test', 'Api\TestController@test');
    Route::any('tests', 'Api\TestController@gettest');
    Route::any('send', 'Api\TestController@send');
    Route::any('gettoken', 'Api\TestController@getToken');
});


Route::any('weixin/api', 'Api\WeixinController@api');
